package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程调用service-item下的ItemApiController控制器
 */
@FeignClient(value = "service-item",fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

    /**
     * 将ItemApiController 中的数据接口发布到feign 上
     * 获取sku详情信息
     * @param skuId
     * @return
     */
    @GetMapping("/api/item/{skuId}")
    public Result getItem(@PathVariable Long skuId);
}
